<%= decidim_form_for(@form, url: import_components_path(@accountability),
                            html: { class: "form form-defaults", id: "new_import_component", data: { form_url: new_import_component_path(@accountability) } },
                            method: :post) do |f| %>
  <% if @form.origin_components.any? %>
    <div class="form__wrapper">
      <div class="card pt-4">
        <div class="card-section">
          <div class="row column">
            <%= f.select :origin_component_id, @form.origin_components_collection, prompt: t(".select_component"), label: t(".origin_component_id") %>
          </div>

          <% if @form.origin_component %>
            <%= render partial: "filters", locals: { f:, form: @form, component: @form.origin_component } %>
          <% end %>
        </div>
      </div>
    </div>
    <div class="item__edit-sticky">
      <div class="item__edit-sticky-container">
        <%= f.submit t(".create"), class: "button button__sm button__secondary" %>
      </div>
    </div>
  <% else %>
    <p><%= t(".no_components") %></p>
  <% end %>
<% end %>
